#listingView {
  --item-selected: white;
  transition: all;
  animation-duration: 0.25s;
  transition: width 0.25s, height 0.25s, box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
  user-select: none;
  min-height: 75vh;
  padding-bottom: 0.5em;
}

body.rtl #listingView {
  margin-right: 16em;
}

#listingView h2 {
  margin: 0 0 0 0.5em;
  font-size: .9em;
  color: rgba(0, 0, 0, 0.38);
  font-weight: 500;
}

#listingView .item div:last-of-type * {
  text-overflow: ellipsis;
  overflow: hidden;
}

#listingView>div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#listingView .item {
  display: flex;
  flex-wrap: nowrap;
  color: #6f6f6f;
  transition: .1s ease background, .1s ease opacity;
  align-items: center;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  width: var(--item-width);
  height: var(--item-height);
  border-radius: 1em;
  background: var(--item-secondary);
  color: var(--textPrimary);
  border-color: var(--divider);
}

#listingView .item div:last-of-type {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

#listingView .item p {
  margin: 0;
}

#listingView .item .size,
#listingView .item .modified {
  font-size: 0.9em;
}

#listingView .item i {
  font-size: 4em;
  vertical-align: bottom;
}

#listingView .item img {
  padding: 0;
  height: 3.2em;
  min-width: 3.2em;
  max-width: 3.2em;
  border-radius: 0.5em;
  object-fit: cover;
  vertical-align: bottom;
}



.message {
  text-align: center;
  font-size: 2em;
  margin: 1em auto;
  display: block !important;
  width: 95%;
  color: rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

.message i {
  font-size: 2.5em;
  margin-bottom: .2em;
  display: block;
}

#listingView.gallery .item,
#listingView.compact .item,
#listingView.normal .item,
#listingView.list .item {
  margin: .5em;
  padding: 0.5em;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 3px, rgba(0, 0, 0, 0.12) 0px 1px 2px;
}

#listingView.compact .item:hover,
#listingView.list .item:hover,
.search-entry:hover {
  width: 98% !important;
  margin-left: 1% !important;
  padding-left: 0.5em !important;
}

#listingView.list .item,
#listingView.compact .item {
  max-width: 100%;
  border-radius: 0em;
}

#listingView .item div:last-of-type {
  width: 100%;
}

#listingView.gallery .item {
  display: flex;
  flex-direction: column;
  align-content: center;
  overflow: hidden;
  justify-content: center;
  padding: 0;
  position: relative;
}

#listingView.gallery .item .gallery-div {
  display: contents;
}

#listingView.normal .item,
#listingView.gallery .item {
  transition: width 0.25s, height 0.25s, box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}


#listingView.gallery .item .text {
  text-shadow: 0 0 2px white;
  pointer-events: none;
  font-weight: 700;
  position: absolute;
  z-index: 1;
  transform: translateY(6em);
}

#listingView.gallery .item .text .name {
  text-align: center;
}

#listingView.gallery .item[data-type=image] div:last-of-type {
  color: white;
}

#listingView.gallery .item i {
  margin: auto;
  font-size: 8em;
  background: none;
}

#listingView.gallery .item span {
  display: flex;
}

#listingView.list .item img,
#listingView.compact .item img {
  min-width: unset;
}

#listingView.gallery .item img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  border-radius: 0.5em;
}

#listingView.compact {
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

#listingView.compact .item {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  border-top: 0;
  padding-left: .5em;
}

#listingView.compact h2 {
  display: none;
}

#listingView.compact .item div:first-of-type {
  width: 3em;
}

#listingView.compact .item div:first-of-type i {
  font-size: 2em;
}

#listingView.compact .item div:first-of-type img {
  width: 1.5em;
  height: 1.5em;
  border-radius: .25em;
}

#listingView.compact .item div:last-of-type {
  display: flex;
  align-items: center;
}

#listingView .header .name {
  margin-right: 1.5em;
}

#listingView .header>p {
  margin: 0;
  cursor: pointer;
}

#listingView .header .size,
#listingView.list .item .size,
#listingView.compact .item .size {
  width: 25%;
}

#listingView.list .item .size.adjustment,
#listingView.compact .item .size.adjustment {
  width: calc(25% + 1em) !important;
}


#listingView .header .name,
#listingView.list .item .name,
#listingView.compact .item .name {
  width: 50%;
}

#listingView.list .item .name.adjustment,
#listingView.compact .item .name.adjustment {
  width: calc(50% + 1em) !important;
}

#listingView.normal .item .text {
  padding-left: 0.3em;
}

#listingView .header i {
  font-size: 1.5em;
  vertical-align: middle;
  margin-left: .2em;
}

#listingView.compact .header {
  z-index: 999;
  padding: .85em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

#listingView.compact .item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#listingView.compact .header {
  margin: 0;
  border-bottom: unset;
  box-shadow: unset;
}

#listingView.compact .header>div:first-child {
  width: 0;
}

#listingView.compact .header a {
  color: inherit;
}

#listingView.compact .header>div:first-child {
  width: 0;
}

#listingView.compact .header span {
  vertical-align: middle;
}

#listingView .header i {
  opacity: 0;
  transition: .1s ease all;
}

#listingView .header p:hover i,
#listingView .header .active i {
  opacity: 1;
}

#listingView .header .active {
  font-weight: bold;
}

#listingView.list {
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

#listingView.list .item {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: .5em;
  border-top: 0;
}

#listingView.compact .item[aria-selected=true],
#listingView.normal .item[aria-selected=true],
#listingView.list .item[aria-selected=true] {
  background: var(--primaryColor) !important;
  color: var(--item-selected) !important;
}

#listingView.gallery .item[aria-selected=true] {
  border: 1em solid var(--primaryColor) !important;
  padding: 0;
}

#listingView.gallery .item[aria-selected=true] .text {
  padding: 0;
}

#listingView.gallery .item .size,
#listingView.gallery .item .modified {
  opacity: 0;
}

#listingView.list .item div:first-of-type {
  width: 3em;
}

#listingView.list .item div:first-of-type i {
  font-size: 2em;
}

#listingView.list .item div:first-of-type img {
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.2em;
}

#listingView.list .item div:last-of-type {
  display: flex;
  align-items: center;
}

#listingView .header {
  display: flex !important;
  background: white;
  border: 1px solid rgba(0, 0, 0, .1);
  z-index: 999;
  padding: .85em;
  width: 100%;
}

#listingView.list .header i,
#listingView.normal .header i,
#listingView.gallery .header i {
  font-size: 1.5em;
  vertical-align: middle;
  margin-left: .2em;
}

#listingView.compact .header,
#listingView.list .header {
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
  border: unset;
}

#listingView.list .item:first-child {
  margin-top: .5em;
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
}

#listingView.compact .lastGroup>div:last-child {
  border-bottom-left-radius: 1em;
  border-bottom-right-radius: 1em;
}

#listingView.list .item:last-child {
  border-bottom-left-radius: 1em;
  border-bottom-right-radius: 1em;
}

#listingView.list .item:last-child {
  margin-bottom: .5em;
}

#listingView>*>.header>div {
  display: flex;
  width: 100%;
}

#listingView.list .header,
#listingView.normal .header,
#listingView.gallery .header {
  margin-bottom: .5em;
}

#listingView.list .header a {
  color: inherit;
}

#listingView .name {
  font-weight: normal;
}

#listingView .header span {
  vertical-align: middle;
}

#listingView.list .header i {
  opacity: 0;
  transition: .1s ease all;
}

#listingView.list .header p:hover i,
#listingView.list .header .active i {
  opacity: 1;
}

#listingView.list .header .active {
  font-weight: bold;
}

.half-selected {
  border-color: var(--primaryColor) !important;
}
